from typing import Optional, List, Union, Any
from pydantic import BaseModel, Field

from app.schemas.base import BaseEntity, PageQuery


class PostQuery(PageQuery):
    """岗位查询参数"""
    postName: Optional[str] = None
    postCode: Optional[str] = None
    status: Optional[str] = None


class PostVO(BaseEntity):
    """岗位视图对象 - 匹配RuoYi sys_post表结构"""
    postId: int
    tenantId: str
    deptId: int
    postCode: str
    postCategory: Optional[str] = None
    postName: str
    postSort: int
    status: str
    delFlag: str
    remark: Optional[str] = None


class PostForm(BaseModel):
    """岗位表单 - 匹配RuoYi sys_post表结构"""
    postId: Optional[int] = None
    deptId: int
    postCode: str
    postCategory: Optional[str] = None
    postName: str
    postSort: int = 0
    status: str = "0"
    remark: Optional[str] = None